<template>
	<view>
		<view class="brand-list">
			<view class="brand-item"  @click="toRoute({path: '/product-list', query: {brand_id: item.id}})" v-for="(item,index) in brandList" :key="index">
				<image :src="item.originalPic"></image>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				brandList:[],//品牌列表
			};
		},
		onLoad() {
			this.query_product_brandList()
		},
		methods:{
			query_product_brandList(){
				this.$api({
					url: '/service.php',
					method: 'get',
					data: {
						action: 'product_brandList',
						page:1,
						pageNum:6,
					},
				}).then(res => {
					if (res.code == 200) {
						this.brandList=res.data||[]
					}
				})
			},
		}
	}
</script>

<style>
	page{
		background: #FFFFFF;
	}
</style>

<style lang="scss" scoped>
.brand-list{
	padding: 24rpx 32rpx;
			margin-top: 18rpx;
			display: flex;
			align-items: center;
			flex-wrap: wrap;
				.brand-item{
					width: 202rpx;
					height: 144rpx;
					background: #E6E9F2;
					border-radius: 8rpx 8rpx 8rpx 8rpx;
					margin-bottom: 16rpx;
					margin-right: 13rpx;
						&:nth-child(3n){
							margin-right: 0;
						}
						image{
							width: 202rpx;
							height: 144rpx;
						}
				}
		}
</style>
